package org.example.feign;

import org.example.entities.CommonResult;
import org.example.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "cloud-payment-service")
public interface PaymentServiceFeign {

    @RequestMapping(value = "/demo/getHost", method = RequestMethod.GET)
    public String getHost();

    @RequestMapping(value = "/payment/get", method = RequestMethod.GET)
    public CommonResult<Payment> getPaymentById(@RequestParam("id") Long id);
}
